
<div class="alert alert-info alert-fn-valid" style="line-height:26px;">
    <strong>提示！</strong>add tag ：）    
</div>

<form id="operateTagForm" role="form" class="form-horizontal">
    <div class="hide">
        <input type="hidden" id="_id" value=""/>
    </div>

    <div class="form-group">      
        <label for="title" class="col-sm-2 control-label">标签名</label>
        <div class="col-sm-9">
            <input type="text" id="title" name="title" class="form-control" placeholder = "请输入标签名" ng-model="curTag.title"/>
        </div>
    </div>
    <div class="form-group color-group" style="margin-bottom:0px;">
          <label class="col-sm-2 control-label">标签颜色</label>
          <div class="line_color col-sm-8 ">
    
            <label class="checkbox-inline label_color">
              <span class="color-choose" 
                style="background-color:#e11d21;"
                ng-class="{'choose glyphicon glyphicon-ok': curTag.color == '#e11d21'}"
                ng-click="changeColor('#e11d21')"
                >&nbsp;</span>
            </label>

    
    
            <label class="checkbox-inline label_color">
              <span class="color-choose " 
                style="background-color:#eb6420;"
                ng-class="{'choose glyphicon glyphicon-ok': curTag.color == '#eb6420'}"
                ng-click="changeColor('#eb6420')"
                >&nbsp;</span>
            </label>

    
    
            <label class="checkbox-inline label_color">
              <span class="color-choose " style="background-color:#fbca14;"
                ng-class="{'choose glyphicon glyphicon-ok': curTag.color == '#fbca14'}"
                ng-click="changeColor('#fbca14')"
                >&nbsp;</span>
            </label>

    
    
            <label class="checkbox-inline label_color">
              <span class="color-choose " style="background-color:#009800;"
                ng-class="{'choose glyphicon glyphicon-ok': curTag.color == '#009800'}"
                ng-click="changeColor('#009800')"
                >&nbsp;</span>
            </label>

    
    
            <label class="checkbox-inline label_color">
              <span class="color-choose " style="background-color:#006b75;"
                ng-class="{'choose glyphicon glyphicon-ok': curTag.color == '#006b75'}"
                ng-click="changeColor('#006b75')"
                >&nbsp;</span>
            </label>

    
    
            <label class="checkbox-inline label_color">
              <span class="color-choose " style="background-color:#207de5;"
                ng-class="{'choose glyphicon glyphicon-ok': curTag.color == '#207de5'}"
                ng-click="changeColor('#207de5')"
                >&nbsp;</span>
            </label>

    
    
            <label class="checkbox-inline label_color">
              <span class="color-choose " 
                style="background-color:#0052cc;"
                ng-class="{'choose glyphicon glyphicon-ok': curTag.color == '#0052cc'}"
                ng-click="changeColor('#0052cc')"
                >&nbsp;</span>
            </label>

    
    
            <label class="checkbox-inline label_color">
              <span class="color-choose " style="background-color:#5319e7;"
                ng-class="{'choose glyphicon glyphicon-ok': curTag.color == '#5319e7'}"
                ng-click="changeColor('#5319e7')"
                >&nbsp;</span>
            </label>

    
          </div>
    </div>

    <div class="form-group color-group" style="margin-bottom:10px;">
        <label class="col-sm-2 control-label"></label>
        <div class="line_color col-sm-8 ">
    
            <label class="checkbox-inline label_color">
              <span class="color-choose " style="background-color:#f7c6c7;"
                ng-class="{'choose glyphicon glyphicon-ok': curTag.color == '#f7c6c7'}"
                ng-click="changeColor('#f7c6c7')"
                >&nbsp;</span>
            </label>

    
    
            <label class="checkbox-inline label_color">
              <span class="color-choose " style="background-color:#fad8c7;"
                ng-class="{'choose glyphicon glyphicon-ok': curTag.color == '#fad8c7'}"
                ng-click="changeColor('#fad8c7')"
                >&nbsp;</span>
            </label>

    
    
            <label class="checkbox-inline label_color">
              <span class="color-choose " style="background-color:#fef2c0;"
                ng-class="{'choose glyphicon glyphicon-ok': curTag.color == '#fef2c0'}"
                ng-click="changeColor('#fef2c0')"
                >&nbsp;</span>
            </label>

    
    
            <label class="checkbox-inline label_color">
              <span class="color-choose " style="background-color:#bfe5bf;"
                ng-class="{'choose glyphicon glyphicon-ok': curTag.color == '#bfe5bf'}"
                ng-click="changeColor('#bfe5bf')"
                >&nbsp;</span>
            </label>

    
    
            <label class="checkbox-inline label_color">
              <span class="color-choose " 
                style="background-color:#bfdadc;"
                ng-class="{'choose glyphicon glyphicon-ok': curTag.color == '#bfdadc'}"
                ng-click="changeColor('#bfdadc')"
                >&nbsp;</span>
            </label>

    
    
            <label class="checkbox-inline label_color">
              <span class="color-choose "
                style="background-color:#c7def8;"
                ng-class="{'choose glyphicon glyphicon-ok': curTag.color == '#c7def8'}"
                ng-click="changeColor('#c7def8')"
                >&nbsp;</span>
            </label>

    
    
            <label class="checkbox-inline label_color">
              <span class="color-choose " 
                style="background-color:#bfd4f2;"
                ng-class="{'choose glyphicon glyphicon-ok': curTag.color == '#bfd4f2'}"
                ng-click="changeColor('#bfd4f2')"
                >&nbsp;</span>
            </label>

    
    
            <label class="checkbox-inline label_color">
              <span class="color-choose "
                style="background-color:#d4c5f9;"
                ng-class="{'choose glyphicon glyphicon-ok': curTag.color == '#d4c5f9'}"
                ng-click="changeColor('#d4c5f9')"
                >&nbsp;</span>
            </label>

    
        </div>
    </div>

    <div class="form-group">    
        <label for="category" class="col-sm-2 control-label"></label>
        <div class="col-sm-3 input-group color colorpicker-default" 
            data-color="#e11d21" style="padding-left:20px;">           
            <div class="pointer input-group-btn add-on">
                <button class="btn default btn-color" type="button">
                    <i class="label_preview " style="background-color: {{curTag.color}};"></i>&nbsp;
                </button>
            </div>
            <input type="text" name="color" id="color" ng-model="curTag.color" class="input_color form-control" />
        </div>
    </div>

    <hr/>

    <div class="form-group"> 
        <div class="col-sm-2 ">
            <a class="btn btn-default" href="#/operate-essay-manage-tag/2" ng-if="sourceType!=1">
              &larr; Back
            </a>
        </div>
        <div class="col-sm-10">
            <button class="btn btn-primary" type="button" ng-click="submitTag()">
              Submit
            </button>
            <a class="btn btn-default btn-margin-left" href="#/list/2" ng-if="sourceType==1">
              Cancel
            </a>
        </div>
    </div>

</form>

<link rel='stylesheet' href='/javascripts/bootstrap-colorpicker/css/colorpicker.css' />
<script type="text/javascript" src="/javascripts/bootstrap-colorpicker/js/bootstrap-colorpicker.js"></script>


<script type="text/javascript" src="/javascripts/jquery/jquery-validate/jquery.validate.min.js"></script>  
<!--metadata.js 验证的时候可以使用class="{}"的方式
    class="{required:true,minlength:5,messages:{required:'请输入内容'}}"
    在使用equalTo关键字时，后面的内容必须加上引号，如下代码：
    class="{required:true,minlength:5,equalTo:'#password'}"
-->
<script type="text/javascript" src="/javascripts/jquery/jquery-validate/jquery.metadata.js"></script>  
<script type="text/javascript" src="/javascripts/jquery/jquery-validate/additional-methods.js"></script>  
<script type="text/javascript" src="/javascripts/jquery/jquery-validate/validate.messages.cn.js"></script>  